-- CALC_TREE_HOUSE_PROPERTY_ARGS

-- 计算树屋使用道具的道具效果
-- @param skillId    技能ID
-- @param skillLevel   技能等级
return function(treeHouse, skillId, skillLevel, desc)
    local prop = treeHouse.dbase:query("prop", {});
    local upPower = 1;
    if type(prop["up_power"]) == "number" and prop["up_power"] == 1
        and not desc then
        -- 树屋提升威力, 显示用的不需要
        upPower = 3;
    end

    local initArgs = table.deepcopy(TreeHouseM.querySkill(skillId, "init_args") or {});
    local levelAdd = tonumber(TreeHouseM.querySkill(skillId, "add_demage"));

    -- 计算伤害
    if initArgs["damage"] ~= nil then
        initArgs["damage"] = (initArgs["damage"] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["probability_damage"] ~= nil then
        initArgs["probability_damage"][1] = (initArgs["probability_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["all_damage"] ~= nil then
        initArgs["all_damage"][1] = (initArgs["all_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["area_damage"] ~= nil then
        initArgs["area_damage"][1] = (initArgs["area_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["row_damage"] ~= nil then
        initArgs["row_damage"][1] = (initArgs["row_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["addition_base_damage"] ~= nil then
        initArgs["addition_base_damage"][1] = (initArgs["addition_base_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["kill_obain"] ~= nil then
        initArgs["kill_obain"][1] = (initArgs["kill_obain"][1] + levelAdd * (skillLevel - 1)) * upPower;
    elseif initArgs["soul_damage"] ~= nil then
        initArgs["soul_damage"][1] = (initArgs["soul_damage"][1] + levelAdd * (skillLevel - 1)) * upPower;
    end

    return initArgs;
end